Conventionally, multi-programming technology has existed where multiple programs are run on a single central processing unit (CPU). An operating system (OS) has a function of dividing the processing time of the CPU and by allocating processes and/or threads to the resulting time periods, the CPU simultaneously runs multiple processes and/or threads. Herein, a process is an execution unit of a program.
Technology has been disclosed for processes that have to finish within a given time period, where the OS allocates the CPU more time for such a thread than other processes, whereby processing is performed preferentially and the processing is performed within the given time period. Further, as technology that effectively switches processes, technology has been disclosed where the OS acquires for each process, the number of execution instructions and first executes the process having the most execution instructions (see, for example, Japanese Laid-Open Patent Publication No. H9-330237). In the technology, the process occupying the cache memory most is executed, whereby overall throughput can be improved.
Technology for a multi-core processor system, where multiple CPUs are provided in a computer system, has also been disclosed. Consequently, in the multi-programming technology, the OS can allocate multiple programs to multiple processes. Further, a multi-core processor system having a distributed system structure has been disclosed, where each CPU has dedicated memory, and when other data is necessary, shared memory is accessed. A multi-core processor system having a centralized system structure has also been disclosed, where each CPU has only cache memory and necessary data is stored in shared memory.
Nonetheless, in the multi-core processor system, when multiple CPUs simultaneously access the shared memory, contention occurs. When contention occurs, the CPUs cannot complete processing within the normal processing period, arising in a problem that real-time processing, which requires completing processing within a given time period, cannot be performed. Real-time processing is processing that has to be completed by a time preliminarily determined at the design stage, and is processing that has an interval period allowing some time between the occurrence of an interrupt event and the start of interrupt processing.
Contention is caused by hardware. Therefore, in the conventional technologies above, even if the technology disclosed in Japanese Laid-Open Patent Publication No. H9-330237, is applied, a problem arises in that the CPU has the potential of causing contention consequent to the process that occupies the cache memory most and resolution of the contention falls short.
When the distributed system is applied, although the frequency of contention is low, since memory has to be provided for each CPU, cost and power consumption is high. Therefore, in integrated environments having cost and power consumption limitations, a multi-core processor system employing a centralized system is often adopted. However, a multi-core processor system employing a centralized system has a problem in that there are many occasions where multiple CPUs simultaneously access the shared memory and thus, contention occurs frequently.